class Solution:
  def minArrayWorse(self, numbers: list) -> int:
    return min(numbers)
  
  def minArray(self, numbers: list) -> int:
    i, j = 0, len(numbers) - 1
    m = int((i + j) / 2)
    while i <= j:
      if i == j:
        return numbers[i]
      if numbers[j] < numbers[m]:
        i = m + 1
        m = int((i + j) / 2)
        continue
      if numbers[j] >= numbers[m]:
        j = j - 1
        m = int((i + j) / 2)
        continue


'''
STATUS: SOLVED
TRIES:  1
TIME:   44 MS
MEMORY: 13.6 MB
'''
if __name__ == "__main__":
  solution = Solution()
  print(solution.minArray([7, 6, 7]))